package com.wbcs.system.buttons;

import com.wbcs.config.component.IComponentConfigBean;
import com.wbcs.system.ReportRequest;
import com.wbcs.system.component.application.report.abstractreport.IEditableReportType;
import com.wbcs.util.Consts_Private;

public class ResetButton extends AbsEditableReportButton
{

    public ResetButton(IComponentConfigBean ccbean)
    {
        super(ccbean);
    }

    @Override
	public String getButtonType()
    {
        return Consts_Private.RESET_BUTTON;
    }

    @Override
	protected String getClickEvent(ReportRequest rrequest,String paramsForGetUrl)
    {
        String accessmode=rrequest.getStringAttribute(ccbean.getId(),"CURRENT_ACCESSMODE",
                ((IEditableReportType)rrequest.getComponentTypeObj(ccbean,null,true)).getDefaultAccessMode()).toLowerCase();
        return "changeReportAccessMode('"+ccbean.getGuid()+"','"+accessmode+"')";
    }
}
